// 产品相关接口
import request from '@/utils/request'

// 查询产品列表
export function productList(query) {
    return request({
        url: '/biz/product/list',
        method: 'get',
        params: query
    })
}

// 根据Id查询
export function productQueryById(query) {
    return request({
        url: '/biz/product/queryById',
        method: 'get',
        params: query
    })
}

// 保存
export function productSave(data) {
    return request({
        url: '/biz/product/save',
        method: 'post',
        data
    })
}

// 修改
export function productUpdate(data) {
    return request({
        url: '/biz/product/update',
        method: 'put',
        data
    })
}

// 删除
export function productDelete(id) {
    return request({
        url: `/biz/product/delete/${id}`,
        method: 'delete',
    })
}


/****************** 系列接口 ******************/
// 查询系列列表
export function productSeriesList(query) {
    return request({
        url: '/biz/productSeries/list',
        method: 'get',
        params: query
    })
}

// 查询系列列表 不分页
export function productSeriesAllList(query) {
    return request({
        url: '/biz/productSeries/allList',
        method: 'get',
        params: query
    })
}

// 根据Id查询
export function productSeriesQueryById(query) {
    return request({
        url: '/biz/productSeries/queryById',
        method: 'get',
        params: query
    })
}

// 保存
export function productSeriesSave(data) {
    return request({
        url: '/biz/productSeries/save',
        method: 'post',
        data
    })
}

// 修改
export function productSeriesUpdate(data) {
    return request({
        url: '/biz/productSeries/update',
        method: 'put',
        data
    })
}

// 删除
export function productSeriesDelete(id) {
    return request({
        url: `/biz/productSeries/delete/${id}`,
        method: 'delete',
    })
}